<template>
  <div class="flex-sub flex jc-between ai-center color-white px-20" style="background-color:#545c64">
    <p>Header</p>
    <p>{{ name }}，<span class="pointer" @click="$router.push({ name: 'Login' })">退出</span></p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      name: "",
    };
  },
  mounted() {
    let name = localStorage.getItem("name");
    if (name) this.name = name;
  },
};
</script>
